<template>
	<view class="pageBox" :style="{paddingTop: statusBarHeight + 44 + 'px',}">
		<view class="topHead flex-between" :style="{top: statusBarHeight + 'px',}">
			<uni-icons type="back" size="24" @click="goBack"></uni-icons>
			<view class="title">
				兑换
			</view>
			<view class="right" @click="onRight">
				兑换说明
			</view>
		</view>
		
		<view class="titleBox">
			请选择您的兑换仓单
		</view>
		<view class="title2">
			请仔细阅读过进行选择
		</view>
		<view class="main flex-center">
			<view class="mainItem flex-center" @click="goPage('/property/cdExchange?type=1')">
				兑换原始仓单
			</view>
			<view class="mainItem flex-center" @click="goPage('/property/cdExchange?type=2')">
				兑换持有仓单
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				statusBarHeight: "",
			}
		},
		onLoad() {
			this.statusBarHeight = this.$mySysInfo().top;
		},
		methods: {
			onRight() {
				uni.navigateTo({
					url: '/property/forInstructions'
				})
			},
			goBack() {
				const pages = getCurrentPages()
				if (pages.length === 1) {
					if (typeof params === 'number') {
						history.go(-params)
					} else {
						history.back()
					}
				} else {
					uni.navigateBack({
						delta: 1
					});
				}
			},
			goPage(url) {
				// console.log("兑换仓单");
				uni.navigateTo({
					url: url
				})
			},
		},
	}
</script>

<style scoped lang="scss">
	.pageBox {
		width: 100%;
		min-height: calc(100vh - var(--window-top));
		background-color: #ffffff;

		.topHead {
			background-color: #ffffff;
			height: 88rpx;
			width: 100%;
			padding: 0 32rpx;
			position: fixed;
			top: 0;
			left: 0;
			z-index: 3;

			.title {
				font-size: 32rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #000000;
				position: absolute;
				top: 22rpx;
				left: 50%;
				transform: translate(-50%, 0);
			}

			.right {
				font-size: 24rpx;
				font-family: PingFang SC-Regular, PingFang SC;
				font-weight: 400;
				color: #F2615F;
			}
		}

		.titleBox {
			font-size: 48rpx;
			font-family: PingFang SC-Medium, PingFang SC;
			font-weight: 500;
			color: #000000;
			padding: 56rpx 0 0 30rpx;
		}

		.title2 {
			font-size: 24rpx;
			font-family: PingFang SC-Regular, PingFang SC;
			font-weight: 400;
			color: #999999;
			margin-top: 16rpx;
			padding-left: 30rpx;
		}

		.main {
			padding-top: 42rpx;
			flex-direction: column;

			.mainItem {
				width: 530rpx;
				height: 300rpx;
				border-radius: 24rpx 24rpx 24rpx 24rpx;
				font-size: 40rpx;
				font-family: PingFang SC-Medium, PingFang SC;
				font-weight: 500;
				color: #FFFFFF;
				margin-top: 80rpx;
				background-image: url("http://www.bobei.shop/static/third/topHeadBg.png");
				background-size: 100% 100%;
				background-repeat: no-repeat;


			}
		}
	}
</style>
